#!/bin/sh /etc/rc.common
# Copyright (C) 2006-2011 OpenWrt.org

START=22
STOP=99

USE_PROCD=1
PROG=/sbin/udhcpc

start_service() {
    procd_open_instance
    if ps | grep [u]dhcpc; then
        killall -q -KILL udhcpc
    fi
    procd_set_param command $PROG -i wlan0 -S -t 5 -T 7 -b -q
    procd_close_instance
}

stop_service(){
    procd_open_instance
    if ps | grep [u]dhcpc; then
        killall -q -KILL udhcpc
    fi
    procd_close_instance
}


restart(){
    if ps | grep [u]dhcpc; then
        killall -q -KILL udhcpc
    fi
    $PROG -i wlan0 -S -t 5 -T 7 -b -q
}
